package org.objectrproject;

import java.util.List;


import org.objectrproject.service.GenericService;
import org.objectrproject.basic.Class;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class Main {

	private static final String CONTEXT_CONFIG_LOCATION = "spring-context.xml";
	private static ApplicationContext springAppCtx;
	
	@SuppressWarnings("unchecked")
	public static void main(String[] args) {
		
		springAppCtx = new FileSystemXmlApplicationContext(CONTEXT_CONFIG_LOCATION);
		

		// List classes
		GenericService<Class> classService = (GenericService<Class>) springAppCtx.getBean("classService");
        List<Class> objectList = classService.getObjects();
        
        for ( Class c : objectList) {
        	System.out.println(c);
        }
	}

}
